
public class Reinforcement {
	/**
	 * AI Search Algorithm
	 * Called by the Game Class
	 * Learns the best way to find the ship
	 * 
	 * @author Larry Savago
	 * @author Casey Huckins
	 * @date 4/13/2012
	 */
	
	private int x = 0;
	
	public int search(Board board, Ship ship) {
		PolicyManager p = new PolicyManager();
		x = p.getJunk();
		return x;
	}
	
	// Elements of system:
	
		// Policy manager who decides what optimal policy should be used.
	
		// Policies
		// 1. Random - initial policy when first called
		// 2. Repeater policy - the user will repeats previous entries
		// 3. Opposite policy - the user doesn't repeat previous entries
		// 4. Center policy - the user always puts ships in the center
		// 5. Outside policy - the user always puts the ship in the outside
	
		// Reward function - determines a rating system to order policies for short term gains.
		
		// Value function - determines a rating system in order to continue to evaluate what the best policy is over the life of the program.
	
		// Environment
			// set of possible states
			// set of possible actions
			// percepts
			// goals, successess and failures
		
	// Algorithm
		
	// Initialization setup
	// while (learning)
	//		Select Policy PolicyManager.getPolicy()
	//		while (searching)  - Each game or each search? 
	//			choose an action based on policy
	//			Carry out action - search(square)
	// 			from success/failure of action now reward policy manager based on result
	//			Go to new State
	
	// 
	
	private class PolicyManager {
		private int junk;
		private PolicyManager() {
			junk = 1;
		}
		
		private int getJunk() {
			return junk;
		}
	}
	
	
	
	
	
	
	
}







